package com.favccxx.search.application;

import com.favccxx.search.domain.datasource.datasource.AbstractDataSource;
import com.favccxx.search.domain.datasource.datasource.IDataSourceService;
import com.favccxx.search.domain.datasource.datasource.JdbcDataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author favccxx
 */
@Service
public class DataSourceService {

    @Autowired
    IDataSourceService dataSourceService;

    public void saveJdbcDataSource(JdbcDataSource jdbcDataSource) {
        dataSourceService.saveJdbcDataSource(jdbcDataSource);
    }

    public List<AbstractDataSource> getDataSources() {
        return dataSourceService.findAll();
    }

}
